package com.xiaomaoguai.redis.pub;

import org.junit.Test;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;

import javax.annotation.Resource;

/**
 * @ FileName: SimplePubTestMain.java
 * @ Author: WeiHui-Z
 * @ Date: 2017/6/5 19:40
 * @ Version: v1.0.0
 */
@ContextConfiguration(locations = {"classpath:spring-pubSub-1.xml"})
public class PubSubTest1Main extends AbstractJUnit4SpringContextTests {

    @Resource
    private RedisTemplate redisTemplate;

    @Test
    public void testPublishString() {
        redisTemplate.convertAndSend("TEST", "hello redis pub");
    }

}
